import 'package:flutter_easyloading/flutter_easyloading.dart';
const String baseUrl = "https://mamatata.fun/magic/api";
const String baseImageUrl = "https://mamatata1.oss-cn-shanghai.aliyuncs.com/";

// 封装的显示加载状态的函数
void showLoadingIfNeeded(bool showLoading) {
  if (showLoading) {
    EasyLoading.show(status: 'loading...');
  }
}

// 封装的关闭加载状态的函数
void dismissLoadingIfNeeded(bool showLoading) {
  if (showLoading) {
    EasyLoading.dismiss();
  }
}


class Global {
  static String _tokenId = "";
  static String _baseUrl = "https://mamatata.fun";

  Global() {
    _tokenId = "";
    _baseUrl = "";
  }

  //设置token信息
  static void setTokenId(val) {
    _tokenId = val;
  }

  //调用tokenId信息
  static String getTokenId() {
    return _tokenId;
  }

  //设置baseUrl信息
  static void setBaseUrl(val) {
    _tokenId = val;
  }

  //调用baseUrl信息
  static String getBaseUrl() {
    return _baseUrl;
  }
}
